package com.zh.service;

import com.zh.domain.Model.ws.*;

import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

public interface WebsocketService {

    /**
     * 编辑状态常量
     */
    String EDIT_STATUS_EDITING = "editing";    // 正在编辑(成功获取编辑权限)
    String EDIT_STATUS_RELEASE = "release"; //释放编辑权限
    String EDIT_STATUS_LOCKED = "locked"; // 锁定编辑权限
    String EDIT_STATUS_DENIED = "denied";// 拒绝获取编辑权限
    ConcurrentHashMap<String, SimpleUserModel> editStatusMap = new ConcurrentHashMap<>();
    Boolean handleTableMessage(TableMessageModel tableMessageModel);

    Boolean doUpdate(TableMessageModel tableMessageModel, Integer type);

    boolean handleEditMessage(EditInfoModel editInfoModel);

    List<EditReturnModel> clearUserEditStatus(Integer currentUserId);

    Map<String, SimpleUserModel> getCurrentEditStatus();
}
